<%-- 
    Document   : admin_ger_adrs_atrasados
    Created on : 21/12/2010, 22:27:21
    Author     : Escritorio projetos
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="br.ufc.quixada.adrs.model.Adrs" %>
<%@page import="br.ufc.quixada.adrs.model.Prazo" %>
<%@page import="br.ufc.quixada.adrs.util.UtilAdrs" %>
<%@page import="java.util.List" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<link rel="stylesheet" type="text/css" href="../css/stylePrint.css" media="print"/>
<%@include file="admin_seguranca.jsp"%>
<%
    Prazo prazo = (Prazo) session.getAttribute("prazoAtual");
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Sistema ADRS - Módulo Administrador</title>
    </head>
    <body>
        <%@include file="../imagemBB.jsp" %>
        <h1>Sistema ADRS - Módulo Administrador</h1>
        <%@include file="admin_menu_tres.jsp" %>
        <div id="content">
            <h2 class="titulo">Gerenciamento de Prazo - Visualizar confirmações a prazo personalizado</h2>
            <h3 align="center">Prazo: <%=UtilAdrs.treatToString(prazo.getInicio())%> a <%=UtilAdrs.treatToString(prazo.getFim())%></h3>
            <br /><h4 align="center">Atividade(s): <%=prazo.tipoQuestionarioToString()%></h4><br />
            <% List<Adrs> adrss = (List<Adrs>) session.getAttribute("naoConfirmados");%>
            <fieldset>
                <h4>Não confirmados (pendentes):</h4>
                <%if (adrss == null || adrss.size() == 0) {%>
                <br><p class="mensagemErro">Sem adrs pendentes</p>
                <%} else {%>
                <table>
                    <thead>
                        <tr>
                            <th>Nome ADRS</th>
                            <th>Apelido</th>
                            <th>CPF</th>
                        </tr>
                    </thead>
                    <tbody>
                        <%  for (Adrs a : adrss) {%>
                        <tr>
                            <td><a title="Visualizar Dados do ADRS" href="../ServletCentral?comando=CmdVisualizarAdrs&id=<%=a.getId()%>"><%=a.getUsuario().getNome()%></a></td>
                            <td><%=a.getUsuario().getApelido()%></td>
                            <td><%=a.getUsuario().getCpfFormatado()%></td>
                        </tr>
                        <%}%>
                    </tbody>
                </table>
                <p class="resumoTabela">Total: <%= adrss.size()%></p><br />
                <%}%><br />
                <% List<Adrs> adrssConfirmados = (List<Adrs>) session.getAttribute("confirmados");%>
                <h4>Confirmados:</h4>
                <%if (adrssConfirmados == null || adrssConfirmados.size() == 0) {%>
                <br><p class="mensagemErro">Sem confirmados.</p>
                <%} else {%>
                <table>
                    <thead>
                        <tr>
                            <th>Nome ADRS</th>
                            <th>Apelido</th>
                            <th>CPF</th>
                        </tr>
                    </thead>
                    <tbody>
                        <%  for (Adrs a : adrssConfirmados) {%>
                        <tr>
                            <td><a title="Visualizar Dados do ADRS" href="../ServletCentral?comando=CmdVisualizarAdrs&id=<%=a.getId()%>"><%=a.getUsuario().getNome()%></a></td>
                            <td><%=a.getUsuario().getApelido()%></td>
                            <td><%=a.getUsuario().getCpfFormatado()%></td>
                        </tr>
                        <%}%>
                    </tbody>
                </table>
                <p class="resumoTabela">Total: <%= adrssConfirmados.size()%></p><br />
                <%}%><br />
            </fieldset><br />
            <div class="no-print">
                <input type="button" name="imprimir" value="Imprimir" title="Imprimir" class="button" onclick="window.print();">
                <a href="../ServletCentral?comando=CmdVisualizarPrazosAntigos" title="Voltar" class="button2">Voltar</a>
            </div>
        </div>
        <%@include file="../footer.jsp" %>
    </body>
</html>
